{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "\n",
    "# Load the Excel file\n",
    "file_path = 'path_to_your_file.xlsx'\n",
    "df = pd.read_excel(file_path)\n",
    "\n",
    "# Assuming the speeches are in a column named 'Speech'\n",
    "column_name = 'Speech'\n",
    "\n",
    "# Count the occurrences of \"자유\" in each cell\n",
    "df['자유_count'] = df['Content'].apply(lambda x: str(x).count('자유'))\n",
    "\n",
    "# Save the results to a new Excel file\n",
    "output_file_path = 'path_to_output_file.xlsx'\n",
    "df.to_excel(output_file_path, index=False)\n",
    "\n",
    "print(df[['Speech', '자유_count']])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
